#include "vector3d.h"

Vector3D::Vector3D(){
	x = 0.0;
	y = 0.0;
	z = 0.0;
}

Vector3D::Vector3D(double _x, double _y, double _z):x(_x), y(_y), z(_z){}

Vector3D::~Vector3D(){}

Vector3D& Vector3D::operator=(const Vector3D& _vector) {
	if(this != &_vector) {
		x = _vector.x;
		y = _vector.y;
		z = _vector.z;
	}
	return *this;
}

Vector3D Vector3D::operator+(const Vector3D& _vector) {
	return Vector3D(x+_vector.x, y+_vector.y, z+_vector.z);
}

Vector3D Vector3D::operator-(const Vector3D& _vector) {
	return Vector3D(x-_vector.x, y-_vector.y, z-_vector.z);
}
